﻿<!-- Copyright 2012-2017 Dmitry Kischenko

Licensed under the Apache License, Version 2.0 (the "License"); 
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS, 
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied. 
See the License for the specific language governing permissions and 
limitations under the License. -->
<Window x:Class="xFunc.Views.AddVariableView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:res="clr-namespace:xFunc.Resources"
        xmlns:views="clr-namespace:xFunc.Views"
        Title="{x:Static res:Resource.AddVarTitle}" Width="270" Height="166"
        WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
        ShowInTaskbar="False">
    <Window.CommandBindings>
        <CommandBinding Command="views:AddVariableView.OKCommand" Executed="OKCommand_Executed" CanExecute="OKCommand_CanExecute" />
    </Window.CommandBindings>

    <Grid>
        <Label Content="{x:Static res:Resource.AddVarName}" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Target="{Binding ElementName=nameBox}" />
        <TextBox x:Name="nameBox" HorizontalAlignment="Left" Height="23" Margin="85,14,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="167" />
        <Label Content="{x:Static res:Resource.AddVarValue}" HorizontalAlignment="Left" Margin="10,41,0,0" VerticalAlignment="Top" Target="{Binding ElementName=valueBox}" />
        <TextBox x:Name="valueBox" HorizontalAlignment="Left" Height="23" Margin="85,45,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="167" />
        <CheckBox x:Name="readOnlyBox" Content="{x:Static res:Resource.AddVarReadOnly}" HorizontalAlignment="Left" Margin="10,73,0,0" VerticalAlignment="Top" />

        <Grid Background="#FFEFEFEF" Height="39" VerticalAlignment="Bottom">
            <Button Content="{x:Static res:Resource.AddVarOK}" HorizontalAlignment="Right" Margin="0,10,87,8" Padding="8,0,8,0" MinWidth="75" IsDefault="True" Command="views:AddVariableView.OKCommand" />
            <Button Content="{x:Static res:Resource.AddVarCancel}" HorizontalAlignment="Right" Margin="0,10,8,8" Padding="8,0,8,0" MinWidth="75" IsCancel="True" />
        </Grid>
    </Grid>
</Window>
